import java.util.*;

public class TestLinkedHash {
	public static void main(String[] args) {
		RandomIterable rand = new RandomIterable(10000000, 1, 1000);
		List<Integer> numbers = new LinkedList<Integer>();

		long start = System.currentTimeMillis();

		for (Integer i : rand) {
			numbers.add(i);
		}

		long end = System.currentTimeMillis();

		System.out.println("Took " + (end - start) + " ms");

		Set<Integer> set = new HashSet<Integer>(numbers);

		int listSize = numbers.size();
		int setSize = set.size();

		System.out.println("List size:\t" + listSize);
		System.out.println("Set size:\t" + setSize);
	}
}
